package model

/*
发送命令格式
{
	"uuid": "12121212",
	"fac": "deer_1_1",
	"order_id": 10074,
	"dt": "2019-03-27 14:34:00",
	"priority": 1,
	"timeout": 20,
	"recopy": 3,
	"data": [{
		"dtu": "5",
		"cjq": "1",
		"value": ["175,01,手动,90.1"]
	}]
}
*/

var SendCmdChan chan SendCmdMode

type CommandItem struct {
	Cjq   string   `json:"cjq"`
	Dtu   string   `json:"dtu"`
	Value []string `json:"value"`
}

type Command struct {
	Data     []CommandItem `json:"data"`
	Dt       string        `json:"dt"`
	Fac      string        `json:"fac"`
	OrderID  int           `json:"order_id"`
	Priority int           `json:"priority"`
	Recopy   int           `json:"recopy"`
	Timeout  int           `json:"timeout"`
	UUID     string        `json:"uuid"`
}

type AddInfo struct {
	HouseId string
	ClassId string
	Hswd    float64
	Jswd    float64
	Snwd    float64
	CurrFkd int
	NeedFkd int
	Remarks string
}

type SendCmdMode struct {
	Command
	AddInfo
}
